#pragma once
#include <game/Config.h>
#include <boost/scoped_ptr.hpp>

namespace liba {
namespace lib3d {
namespace node {
class Camera;
} // namespace node
} // namespace lib3d
} // namespace liba

ARELLO_GAME_NAMESPACE_DECL_START
namespace controls {
class ControlCollection;
} // namespace controls
namespace input {

/** Handles user input from input manager and generates input events for given controls */
class InputDispatcher
{
public:
	InputDispatcher();
	~InputDispatcher();

	/** Sets source of controls that will receive events generated by this object.
	*
	*	This method doesn't transfer ownership. It's caller's responsibility to check that 
	*	controls' collection will be alive.
	*/
	void SetControls(controls::ControlCollection* value);
	/** Sets active camera that is used to render scene */
	void SetCamera(liba::lib3d::node::Camera* value);
	
	/** Make this input dispatcher active, it'll handle mouse actions */
	void Activate();
	/** Make this input dispatcher inactive, it'll ignore mouse actions */
	void Deactivate();
private:
	boost::scoped_ptr<struct InputDispatcherPrivates> privates;
};

} // namespace input
ARELLO_GAME_NAMESPACE_DECL_END